Method and Apparatus for Encoding Security Status Information

ABSTRACT

A method of transmitting messages from a sender to a recipient over a wireless channel, the messages including a sequence counter and a frame counter. The method comprises establishing initial values of the sequence counter and the frame counter at the sender. Initial values of the frame counter and the sequence counter are provided to the recipient. The sender sends compressed messages including the value of the sequence counter and not the frame counter and monitors for an acknowledgement of receipt by the recipient. When no acknowledgment is received, the sender sends uncompressed messages until an acknowledgement of receipt is received from the recipient. The sequence counter is incremented and the next value of the frame counter is established as the integer next larger than previous value of the frame counter which is congruent to the sequence counter modulo 256.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a divisional application of U.S. application Ser.No. 10/726,493 filed on Dec. 4, 2003, which claims priority from UnitedStates Provisional Application No. 60/431,078 filed on Dec. 4, 2002 andUnited States Provisional Application No. 60/431,645 filed on Dec. 5,2002 hereby incorporated by reference. FIELD OF THE INVENTION

The present invention relates to a method and apparatus for encodingsecurity status information.

DESCRIPTION OF THE PRIOR ART

Low rate personal wireless networks are used with small devices withtransmission speeds of up to 250 kilobits per second. These devicestypically have severe power constraints as they are operated onbatteries. In many of these devices, such as battery-operated sensors,remote controls, car door openers and light switches, it is necessary tohave long battery life. If the batteries die too quickly then thereplacement cost can be equal to the cost of the product itself.

It is also desirable to have secure communications between suchconstrained devices to prevent abuse of the system. One technique is toencrypt data being sent between the devices. Encryption mathematicallytransforms the transmitted information using a secret key known only tothe two parties who are communicating. Without the key, the message isunintelligible. However, this requires overhead in the message structurein order to allow the recipient to decrypt the data. The sender mustindicate which key it has used, which algorithm it has used to encrypt,and input parameters of the encryption algorithm such as a counter.

Usually, a frame counter is used as one of the input parameters forfreshness in the encryption. Freshness means that the parameters changefor each communication and are thus not reused. One type of encryptioncalled a block cipher breaks up a message into parts (blocks) of a fixedsize. Various block ciphers are known such as DES (Data EncryptionStandard) and AES (Advanced Encryption Standard). Block ciphers oftenuse an input block as a seed when used in stream-cipher mode. This inputblock should not repeat in order to maintain data freshness and dataconfidentiality. In one approach, a frame counter and a key identifierare used as the input block and are indicated in the message that issent. In addition, each message usually includes a sequence counter thatis not used for security but rather to match the sending of a messagewith the acknowledgement thereof by the recipient. These messagestypically include a data portion referred to as the payload which isabout 20 bytes. Accordingly, a five byte overhead for securityinformation represents a 25% overhead.

The amount of data transferred between such constrained devices is oneof the principal factors in their battery life. Accordingly, it isdesirable to reduce the amount of information transferred.

However, in order to maintain the security of the underlying encryptionmethods, the number of bits in the frame counter should not be reduced.

SUMMARY OF THE INVENTION

In accordance with one aspect of the present invention there is provideda method of encoding a frame counter used in communication between asender and a receiver. The method comprises maintaining a sequencecounter and a frame counter at the sender and computing new values ofthe frame counter such that the frame counter is unique and recoverablefrom an encoded value of the frame counter and the sequence counter.

In another aspect there is provided a method of transmitting messagesfrom a sender to a recipient over a wireless channel, the messagesincluding a sequence counter and a frame counter. The method comprisesestablishing initial values of the sequence counter and the framecounter at the sender. Initial values of the frame counter and thesequence counter are provided to the recipient. The sender sendscompressed messages including the value of the sequence counter and notthe frame counter and monitors for an acknowledgement of receipt by therecipient. When no acknowledgment is received, the sender sendsuncompressed messages until an acknowledgement of receipt is receivedfrom the recipient. The sequence counter is incremented and the nextvalue of the frame counter is established as the integer next largerthan previous value of the frame counter which is congruent to thesequence counter modulo 256.

In yet another aspect, there is provided a method of transmittingmessages from a sender to a recipient over a wireless channel, themessages including a sequence counter and a frame counter. The methodcomprises establishing initial values of the sequence counter and theframe counter at the sender and providing the initial values of theframe counter and the sequence counter to the recipient. The sendersends compressed messages including the value of the sequence counterand not the frame counter. Periodically the sender sends uncompressedmessages including the value of the frame counter according topredefined criteria. The sender increments the sequence counter andestablishes the next value of the frame counter as the integer nextlarger than previous value of the frame counter which is congruent tothe sequence counter modulo 256.

In a further aspect, there is provided a wireless device for receivingcommunications from other wireless devices in a wireless network. Thedevice comprises storage for a frame counter, a receiver for obtaining amessage over the wireless network, the message including a sequencecounter and data encrypted using a secret key and a new value of theframe counter as input to the encryption. The device includes adecryptor configured to perform decryption complementary to theencryption used in the message, the decryptor having access to thesecret key. A processor is connected to the message receiver andconfigured to recover the value of the frame counter from a sequencecounter in the message and provide the frame counter and encrypted datafrom the message to the decryptor.

In a yet further aspect, there is provided a wireless device for sendingcommunications to other wireless devices in a wireless network. Thedevice comprises storage for a frame counter and a sequence counter anda processor to compute a new value of the frame counter such that theframe counter is unique and recoverable from an encoded value of theframe counter and the sequence counter. The device further includes atransmitter for sending a message over the wireless network, the messageincluding a sequence counter and data encrypted using a secret key andthe new value of the frame counter as input to the encryption.

BRIEF DESCRIPTION OF THE DRAWINGS

These and other features of the preferred embodiments of the inventionwill become more apparent in the following detailed description in whichreference is made to the appended drawings wherein:

FIG. 1 is a schematic representation of a communication system.

FIG. 2 is a more detailed view of a correspondent in the communicationsystem of FIG. 1.

FIG. 3 is a schematic representation of a message packet used by thecorrespondents of FIG. 1.

FIG. 4 is a schematic representation of another embodiment of a messagepacket.

FIG. 5 is a schematic representation of an information exchange by thecorrespondents of FIG. 1.

FIG. 6 is a schematic representation of an information interchange amongthe correspondents of FIG. 1.

FIG. 7 is a schematic representation of the method used in FIG. 6.

FIG. 8 is a schematic representation of an information exchange betweenthe correspondents of FIG. 1.

FIG. 9 is a schematic representation of the method used in FIG. 8.

FIG. 10 is a schematic representation of the method used in FIG. 9.

FIG. 11 is a schematic representation of another information exchangebetween the correspondents of FIG. 1.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

As may be seen in FIGS. 1 and 2, a communication system 10 consists ofcorrespondents 12, 14, 16, and 18 communicating over a wireless network20. Correspondent 12 includes a processor 22, a storage medium 24, aframe counter 26, a user interface 28. The processor 22 and storage 24may be provided in an integrated circuit. The frame counter 26 is usedas input to an encryption method in the processor 22. The user interface28 may be provided by a simple switch and an LED or by moresophisticated means such as a keyboard and a monitor or other display.Each correspondent includes a wireless network interface 29 which sendsand receives signals at a predetermined radio frequency such as 2.4 GHzor 868 MHz/915 MHz. The correspondents can communicate directly witheach other when they are in close enough proximity. The network 20 alsoprovides wireless interfaces linked to routers, bridges, and othernetwork hardware to provide connectivity beyond the range of wirelesssignals and to assist in establishing connections between physicallyclose correspondents.

The correspondents exchange messages using packets in the format shownin FIG. 3 by the numeral 30. The packet consists of three portions: aheader 32, a payload 40, and a footer 48. The header 32 contains a framecontrol portion 34, a sequence counter 36 which is notated as DSN andaddressing fields 38. The payload portion 40 contains the actual contentof the message, and includes security status information and data 46.The security status information 42, 44 includes a compressed framecounter 42 and a key identifier 44. The footer portion 48 of the packet30 includes an error control sequence. As shown in FIG. 2, thecompressed frame counter 42 and the sequence counter 36 together formthe frame counter 50.

In operation, the header is used to direct the packet to its intendedaddress using the addressing fields. At the recipient, the footer isused to perform error correction and to ensure that the message has beenreceived intact. In addition, the recipient may acknowledge the message.The acknowledgement will include the sequence counter DSN. The sequencecounter is used to match sent messages with their acknowledgements. Thesecurity status information includes a frame counter which is used asinput to a decryption method at the recipient. The decryption method isthen used to decode the data and recover the original data sent by thesender.

In order to reduce the amount of information transferred, the framecounter is specially encoded. This encoding is accomplished by updatingthe frame counter N to a value of N₀≥N such that N₀ min{N¹≥N such thatN′=DSN mod 256}. The frame counter can then be represented as 3 byteencoded frame counter portion with the sequence counter DSN appendedthereto. Accordingly, it is only necessary to transmit 3 bytes in thepayload portion to communicate the frame counter rather than the fulllength of 4 bytes.

In another embodiment, further reduction in the information transferredmay be achieved by omitting the frame counter altogether from thepayload as seen in FIG. 4. The sequence counter DSN is then used torecover the new value of the frame counter by combining the previousvalue of the frame counter 42 in storage 24 with the value of thesequence counter. In this embodiment, the message is compressed byremoving the frame counter entirely.

Referring therefore to FIG. 5, a simplified information exchange betweenone sender and one recipient is shown. The sender begins with a framecounter of 270. The sender transmits the frame counter 270 to therecipient. The recipient is then initialised to the beginning value of270. For each further communication, the sequence counter isincremented. Accordingly, the next message has a sequence counter of 15and a frame counter of 271. The sender sends the value of the sequencecounter, which is 15 and equal to 271 mod 256, to the recipient. Therecipient then updates the frame counter with the integer next larger to270 which is congruent to 15 mod 256, in this case the value 271. Eachsequential communication proceeds similarly with the sequence counterbeing incremented. Accordingly, the next transmission of a frame counter272 is accomplished by transmitting the sequence counter of 16. Therecipient may then recover the value 272 of the frame counter from thesequence counter 16 and the previous frame counter 271.

In typical use, the sender will be communicating with several recipientsand accordingly the messages may be spaced out in time. There may beintervening messages to other recipients which necessitate incrementingthe sequence control DSN between messages to any given recipient.Accordingly, the consecutive structure shown in FIG. 5 may not always bepresent. The communication may proceed as shown in FIG. 6 by the numeral70. In this case, the frame counter begins at 7, which is sent to thefirst recipient which sets its frame counter to 7. In this example sometime passes before the next message is transmitted to the firstrecipient. In this case, the next message is transmitted with a framecounter of 258 indicating that 250 other messages have been transmittedto other recipients by the sender in the interim. The value 258 istransmitted by sending the sequence counter, which is 258 mod 256=2. Therecipient then recovers 258 as the integer next larger than 7 which iscongruent to 2 mod 256. The next message is transmitted with a framecounter of 289 which is transmitted by sending the sequence counter of33. However, in this case, the recipient does not acknowledge receipt ofthis message. The non-acknowledgement may occur for a number of reasonsincluding simply not receiving the message or a failure in the errorcontrol. Accordingly, the recipient's frame counter remains at 258.Since the message is not acknowledged, the sender retransmits the fullvalue 289 of the frame counter. This retransmission resets the framecounter at the recipient to the value 289 and the recipient acknowledgeswith the value 33=289 mod 256. The final message sent immediatelyfollowing the third message is 290, which is communicated by sending thesequence counter of 34 which is 290 mod 256. The recipient updates itsframe counter to 290 and acknowledges receipt of the value 34.

In the above example, the recipient always acknowledges messages fromthe sender. Accordingly, the sender is immediately notified that amessage has not been received because it does not receive anacknowledgement. In this case, the sender can send a full message toresynchronise transmission.

Referring to FIG. 7, the steps of the above method are shown generallyby the numeral 80. The sender first sends a compressed message at step82. The compressed message includes the value of the sequence counterand not the frame counter. Upon receipt of the compressed message, therecipient updates its frame counter as the minimum value larger than thecurrent frame counter which is congruent to the sequence counter modulo256. If the message is acknowledged at step 84 then execution continues.Otherwise, the sender repeatedly sends uncompressed messages at step 86until one of these is acknowledged. The uncompressed messages includethe frame counter. Upon receipt of the uncompressed message, therecipient updates its frame counter to the value of the frame counter inthe uncompressed message. Once the message is acknowledged, the senderincrements the sequence counter for the next message at step 88. It isparticularly expedient to increment the sequence counter by 1, howeverit will be recognized that other method of updates the sequence countermay be used by the sender. The sender then establishes the frame counterfor the next message as the minimum value larger then the current framecounter which is congruent to the sequence counter modulo 256.

In an alternative embodiment, the recipient does not acknowledgemessages received. The sender continues to transmit regardless ofwhether the messages are actually received. Accordingly, it is necessaryfor the sender to occasionally send uncompressed messages containing thevalue of the frame counter in case a loss of synchronisation hasoccurred. Referring therefore to FIG. 8, the messages transmitted by thesender arc shown generally by the numeral 100. The first message reachesthe recipient and accordingly both the sender and the recipient haveframe counters of 7. However, the second message is lost duringtransmission. Accordingly, the recipient's frame counter is not updated.The third message is an uncompressed message and accordingly, updatesthe recipient's frame counter to 288, regardless of the earlier loss ofsynchronisation. The fourth message 289 is sent with the sequencecounter of 33 and not the frame counter. This updates the recipient'sframe counter to 289. The fifth message 547 is lost during thetransmission, and accordingly the recipient's frame counter isincorrect. The next message 601 is transmitted as the sequence counterof 89, which results in an incorrect frame counter at the recipientsince the computation yields the value 345 which is congruent to 89modulo 256 but differs by 256 from the value of the frame counter in thesender. The incorrect frame counter results in a failure of decryption.Upon discovering the failure, the recipient maintains its frame counterof 289 rather than updating the frame counter to the incorrect value.The final message 805 is sent as an uncompressed message which updatesthe recipient's frame counter to the correct value again.

The steps performed in the example of FIG. 8 are shown schematically inFIG. 9 by the numeral 10. The sender first sends a compressed message atstep 12. The sender then increments the sequence control at step 114then updates the frame counter at step 116. The sender then checks tosee if it is time for resynchronisation at step 118. Resynchronisationcan be performed at periodic intervals such as every 2, 3, 4 . . . , 10transmissions. When the resync is required, the sender sends anuncompressed message at step 120, otherwise the sender proceeds to sendcompressed messages at step 112. It will be recognized that the senderindependently decides which messages to send uncompressed. The sendercannot be guided by the recipient in this choice since there is nofeedback from the recipient.

In a further embodiment, the recipient occasionally acknowledgesmessages. Furthermore, the sender may indicate in the header of a sentmessage that this message should be acknowledged. The recipient cantherefore use such messages to indicate that a loss of synchronisationhas occurred. Referring therefore to FIG. 10, a transmission is shown bythe numeral 130. The first message 7 is sent and is acknowledged by therecipient. Both the sender and the recipient have frame counters of 7.The second frame counter 258 is communicated by sending the sequencecounter of 2 and is lost during transmission. The third message 288 issent as the sequence counter of 32. The recipient acknowledges receiptof the sequence counter 32 however, during the subsequent decryption,the recipient has an error since its frame counter is out of sync withthe sender since the reconstructed value is 32 rather than 288.Accordingly, the recipient enables an error flag. The next message 289is sent as the sequence counter of 33, but is rejected by the recipientdue to the error flag. Another message with a frame counter of 290 issent to the recipient as the sequence counter of 34 and with a requestfor acknowledgement embedded in tie message. When a recipient receivesthis message, it does not acknowledge since the error flag is set.Therefore, the sender resends the message with the frame counter of 290as an uncompressed message which resynchronizes the frame counters ofthe sender and the recipient again. The recipient then acknowledgesreceipt of the message with frame counter 290. The error flag indicatesthat a decryption error occurred and that synchronization must beestablished by received an uncompressed message including the framecounter, rather than a compressed message without the frame counter. Itwill be recognized that loss of synchronization may occur in thisembodiment, but the synchronization is re-established with a delay of atmost one acknowledged message.

Referring to FIG. 11, the steps of this embodiment are shownschematically by the numeral 140. The sender first sends a compressedmessage at step 142. The recipient then acknowledges receipt of theuncompressed message at step 144. The recipient attempts to decrypt themessage at step 146. If there is a failure during decryption at step148, then the recipient sets an error flag at step 150. If there is nofailure and the error flag is set, then the recipient clears the errorflag at step 152. The sender then sends another compressed message atstep 154. When the recipient receives the message, it checks to see ifthe error flag is set at step 156. If the error flag is not set, thenthe recipient acknowledges the message at step 158 and proceeds withdecryption by steps 146 onward. If the flag is set, then the recipientdoes not acknowledge the message at step 160. If the message was sentwith an acknowledgement request at step 162, then the sender detectsthis and sends an uncompressed message at step 164, and executionreturns to the decryption step 146. If no acknowledgement request wassent, then the sender proceeds to send compressed messages at step 154.

It will be recognised that in these embodiments, a reduction in theamount of data transferred is achieved. The reduction is realized bymaintaining frame counters at both the sender and the recipient. Theinventor has recognized that the recipient can reconstruct the correctvalue of the frame counter from partial information received from thesender in combination with the recipient's local copy of theinformation. Furthermore, a recovery mechanism is provided whichre-synchronizes frame counters that end up out-of-synchronization. Itwill be recognized that the recovery mechanism allows the compressiontechnique to be applied in a robust manner.

It will be recognized that the above techniques are not limited to usewith integers but rather may be used with counters that are elements ofa finite set with a partial ordering. Furthermore, although thetechnique has been described in the particularly advantageous setting ofa cryptographic system, it may be applied in other settings wherecounters are used and where a reduction in communication cost is at apremium. One example of such a setting is the inclusion of framecounters to facilitate detection of duplicate transmission.

Although the invention has been described with reference to certainspecific embodiments, various modifications thereof will be apparent tothose skilled in the art without departing from the spirit and scope ofthe invention as outlined in the claims appended hereto.

1-2. (canceled)
 3. A method, comprising: storing, by a wireless device,a local value of a frame counter, wherein the local value of the framecounter was used to decrypt data in a first message; receiving, by thewireless device and over a wireless network, a second message after thefirst message, wherein the second message includes a sequence countervalue identifying the second message and data encrypted with a secretkey; determining, by the wireless device, a new value of the framecounter from the local value of the frame counter and the sequencecounter value in the second message; and decrypting, by the wirelessdevice, the second message based on the new value of the frame counter.4. The method of claim 3, wherein the new value of the frame counter isan integer that is next larger than the local value of the frame counterand congruent to the sequence counter value modulo a specified integer.5. The method of claim 3, wherein the sequence counter value comprises acompressed representation of the new value of the frame counter.
 6. Themethod of claim 3, further comprising: sending an acknowledgementmessage in response to receiving the second message.
 7. The method ofclaim 6, wherein the acknowledgment message includes the sequencecounter value.
 8. The method of claim 3, further comprising: detecting adecryption error based on a loss of synchronization of the framecounter; and setting an error flag based on the detecting of thedecryption error, the error flag indicating the loss of synchronizationof the frame counter.
 9. The method of claim 8, further comprising:removing the error flag upon receiving a third message that includes acurrent value of the frame counter.
 10. A non-transitory computerreadable medium storing instructions to cause a processor to performoperations comprising: storing, by a wireless device, a local value of aframe counter, wherein the local value of the frame counter was used todecrypt data in a first message; receiving, by the wireless device andover a wireless network, a second message after the first message,wherein the second message includes a sequence counter value identifyingthe second message and data encrypted with a secret key; determining, bythe wireless device, a new value of the frame counter from the localvalue of the frame counter and the sequence counter value in the secondmessage; and decrypting, by the wireless device, the second messagebased on the new value of the frame counter.
 11. The non-transitorycomputer readable medium of claim 10, wherein the new value of the framecounter is an integer that is next larger than the local value of theframe counter and congruent to the sequence counter value modulo aspecified integer.
 12. The non-transitory computer readable medium ofclaim 10, wherein the sequence counter value comprises a compressedrepresentation of the new value of the frame counter.
 13. Thenon-transitory computer readable medium of claim 10, the operationsfurther comprising: sending an acknowledgement message in response toreceiving the second message.
 14. The non-transitory computer readablemedium of claim 13, wherein the acknowledgment message includes thesequence counter value.
 15. The non-transitory computer readable mediumof claim 10, the operations further comprising: detecting a decryptionerror based on a loss of synchronization of the frame counter; andsetting an error flag based on the detecting of the decryption error,the error flag indicating the loss of synchronization of the framecounter.
 16. The non-transitory computer readable medium of claim 15,the operations further comprising: removing the error flag uponreceiving a third message that includes a current value of the framecounter.